package com.aspose.cells.a.d;

import com.aspose.cells.Color;

public class zbt implements zbh {
   private int a = 0;
   private float b = 1.0F;
   private Color c = Color.getBlack();
   private long d;
   private int e = 0;
   private com.aspose.cells.b.a.b.zj f;
   private int g = 1;

   public void a(zcm var1) throws Exception {
      this.a = var1.n();
      this.b = (float)Math.max(var1.n(), 1);
      var1.n();
      this.c = var1.e();
      this.c();
   }

   public void a(zcf var1) throws Exception {
      this.d = var1.r();
      this.a = var1.q();
      this.b = (float)Math.max(var1.q(), 1);
      var1.q();
      this.c = var1.e();
      this.c();
   }

   public void b(zcf var1) throws Exception {
      this.d = var1.r();
      var1.q();
      int var2 = var1.q();
      var1.q();
      int var3 = var1.q();
      this.a = (int)(var1.r() & 4294967295L);
      this.b = (float)Math.max(var1.q(), 1);
      int var4 = (int)(var1.r() & 4294967295L);
      if (var4 != 0 && var4 != 2) {
         var1.q();
      } else {
         this.c = var1.e();
      }

      this.e = var1.q();
      if ((var4 & 2) == 2) {
         this.g = 2;
      }

      var1.a();
      if (var4 == 6) {
         this.g = 3;
         var1.q();
         this.f = zbn.b(var1, var2, var3);
      }

      this.c();
   }

   public com.aspose.cells.b.a.b.zm a(Color var1) throws Exception {
      com.aspose.cells.b.a.b.zm var2 = null;
      switch(this.g) {
      case 0:
         return var2;
      case 1:
      default:
         var2 = new com.aspose.cells.b.a.b.zm(this.c, this.b);
         break;
      case 2:
         com.aspose.cells.b.a.b.a.zg var4 = new com.aspose.cells.b.a.b.a.zg(this.e, this.c, var1);
         var2 = new com.aspose.cells.b.a.b.zm(var4, this.b);
         break;
      case 3:
         com.aspose.cells.b.a.b.zx var3 = new com.aspose.cells.b.a.b.zx(this.f);
         var2 = new com.aspose.cells.b.a.b.zm(var3, this.b);
      }

      a(var2, this.a & 15);
      b(var2, this.a & 3840);
      c(var2, this.a & '\uf000');
      return var2;
   }

   private void c() {
      if ((this.a & 15) == 5) {
         this.g = 0;
      }

   }

   private static void a(com.aspose.cells.b.a.b.zm var0, int var1) {
      switch(var1) {
      case 0:
         var0.b(0);
         break;
      case 1:
         var0.b(1);
         break;
      case 2:
         var0.b(2);
         break;
      case 3:
         var0.b(3);
         break;
      case 4:
         var0.b(4);
      }

   }

   private static void b(com.aspose.cells.b.a.b.zm var0, int var1) throws Exception {
      byte var2;
      switch(var1) {
      case 0:
         var2 = 2;
         break;
      case 256:
         var2 = 1;
         break;
      case 512:
         var2 = 0;
         break;
      default:
         throw new Exception("Unknown pen end cap style.");
      }

      var0.c(var2);
      var0.d(var2);
   }

   private static void c(com.aspose.cells.b.a.b.zm var0, int var1) throws Exception {
      switch(var1) {
      case 0:
         var0.e(2);
         break;
      case 4096:
         var0.e(1);
         break;
      case 8192:
         var0.e(0);
         break;
      default:
         throw new Exception("Unknown pen join style.");
      }

   }

   public int a() {
      return 2;
   }

   public long b() {
      return this.d;
   }

   public void a(long var1) {
      this.d = var1;
   }

   public void a(int var1) {
      this.a = var1;
      this.c();
   }

   public void b(Color var1) {
      this.c = var1;
   }
}
